package com.ihunanren.dao.ibatis.weixin;

import java.sql.SQLException;
import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.ihunanren.dao.pojo.SchoolCurriculumInfoDO;
import com.ihunanren.dao.weixin.ISchoolCurriculumInfoDao;

public class SchoolCurriculumInfoDao extends SqlMapClientDaoSupport implements ISchoolCurriculumInfoDao{

	@SuppressWarnings("unchecked")
	@Override
	public List<SchoolCurriculumInfoDO> getSchoolCurriculumInfo(long definedId)
			throws SQLException {
		return getSqlMapClient().queryForList("SchoolCurriculumInfoDao.getSchoolCurriculumInfo",definedId);
	}

	@Override
	public void insertSchoolCurriculumInfo(
			SchoolCurriculumInfoDO schoolCurriculumInfoDO) throws SQLException {
		getSqlMapClient().insert("SchoolCurriculumInfoDao.insertSchoolCurriculumInfo",schoolCurriculumInfoDO);
	}

	@Override
	public boolean updateSchoolCurriculumInfo(
			SchoolCurriculumInfoDO schoolCurriculumInfoDO) throws SQLException {
		return getSqlMapClient().update("SchoolCurriculumInfoDao.updateSchoolCurriculumInfo", schoolCurriculumInfoDO) > 0;
	}

	@Override
	public boolean deleteSchoolCurriculumInfo(long id) throws SQLException {
		return getSqlMapClient().delete("SchoolCurriculumInfoDao.deleteSchoolCurriculumInfo", id) > 0;
	}

	
	
}
